package com.lx.flutest.flu

import android.content.Context
import io.flutter.plugin.common.BinaryMessenger
import io.flutter.plugin.common.MessageCodec
import io.flutter.plugin.platform.PlatformView
import io.flutter.plugin.platform.PlatformViewFactory

class FluFactory(createArgsCodec: MessageCodec<Any>?,binaryMessenger: BinaryMessenger) : PlatformViewFactory(createArgsCodec) {

    private var binaryMessenger: BinaryMessenger
    init {
     this.binaryMessenger = binaryMessenger
    }

    override fun create(context: Context?, viewId: Int, args: Any?): PlatformView {
        val fluView = FluView(context,viewId,args,binaryMessenger)
        fluView.initChannel()
        return  fluView
    }

}